package com.zdj.question;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * @author zhangdj
 * @date 2022-12-29 11:34
 */
//hide-start
public class YieldRate {

    public static void main(String[] args) {
        Object solution = YieldRateSolution.solution(Integer.parseInt(args[0]), Integer.parseInt(args[1]), Double.parseDouble(args[2]));
        System.out.print(solution);
    }
}
//hide-end
class YieldRateSolution {
    public static Object solution(int a, int b, double c) {
        // 总收益率
        BigDecimal yieldRate = new BigDecimal(String.valueOf(c - a)).setScale(20, RoundingMode.HALF_UP)
                .divide(new BigDecimal(a), RoundingMode.HALF_UP)
                .divide(new BigDecimal(b), RoundingMode.HALF_UP);

        // 年化收益率
        BigDecimal result = yieldRate.multiply(new BigDecimal("36500")).setScale(2, RoundingMode.HALF_UP);
        return result + "%";
    }
}
